function addEvent(form)
{
    var event = new Object();
    
    event.capacity = form.capacity.value;
    event.day = form.day.value;
    event.month = form.month.value;
    event.year = form.year.value;

    event.msg = new Object();
    event.msg.content = form.content.value;
    event.msg.point = new Object();
    event.msg.point.x = form.x.value;
    event.msg.point.y = form.y.value;
    $.ajax(
    {

    	type : 'PUT',
        contentType : 'application/json',
        url : '/${project.build.finalName}/restful-services/user-api/message/event/add',
        dataType : "json",
        data : JSON.stringify(event),
        success : function(data, textStatus, jqXHR)
        {
        	alert("event was added");

        },
        error : function(jqXHR, textStatus, errorThrown)
        {
            alert(jqXHR.status);
        }
    });
    
}


